<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title><%= __('hy') %></title>
    <link href="mimage/favicon.ico" rel="shortcut icon"/>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_607959_dp67g6vf79icnmi.css">
    <link rel="stylesheet" href="/mcss/base.css">
    <link rel="stylesheet" href="/css/swiper.min.css">
    <link rel="stylesheet" href="/mcss/mhome.css">
    <link rel="stylesheet" href="/mcss/userInfo.css">
    <link rel="stylesheet" href="/mcss/loading.css">
</head>
<body>
    <%- include('base/mheader'); %>
    <div id="mobileapp" class="mobileapp mobilecotent">
        <div class="loading" v-show="!loading">
            <div class="preloader_4">
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
            </div>
        </div>
        <%- include('base/muserInfo'); %>
        <section class="container">
            <!-- 轮播 -->
            <div class="swiperbox boxsizing">
                <div class="swiper-container">
                    <!-- 轮播 -->
                    <div class="swiper-wrapper">
                        <div class="swiper-slide">
                            <a href="/m/Details/63">
                                <img src="/mimage/slider01.jpg" 
                                class="img-responsive" alt="轮播1">
                            </a>
                        </div>
                        <div class="swiper-slide">
                            <a href="/m/Details/60">
                                <img src="/mimage/slider05.jpg" 
                                class="img-responsive" alt="轮播1">
                            </a>
                        </div>
                        <% if(!allMine.length){ %>
                            <div class="swiper-slide">
                                <a href="/m/singin">
                                    <img src="/mimage/slider07.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(allMine.length){ %>
                            <div class="swiper-slide">
                                <a href="#">
                                    <img src="/mimage/slider07.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(!allMine.length){ %>
                            <div class="swiper-slide">
                                <a href="/m/singin">
                                    <img src="/mimage/slider06.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(allMine.length){ %>
                            <div class="swiper-slide">
                                <a href="/m/Promotionpage">
                                    <img src="/mimage/slider06.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(!allMine.length){ %>
                            <div class="swiper-slide">
                                <a href="/m/singin">
                                    <img src="/mimage/slider04.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(allMine.length){ %>
                            <div class="swiper-slide">
                                <a @click="gotohyperdice">
                                    <img src="/mimage/slider04.jpg" 
                                    class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                        <% } %>
                        <% if(gamelist.length){ %>
                            <% gamelist.forEach((item,index) => { %>
                                <% if(allMine.length){ %>
                                    <div class="swiper-slide">
                                        <a @click="gotohyperdice">
                                            <img src="/m<%= item.imageUrl[0] %>" 
                                            class="img-responsive" alt="轮播1">
                                        </a>
                                    </div>
                                <% } %>
                                <% if(!allMine.length){ %>
                                    <div class="swiper-slide">
                                        <a href="/m/singin">
                                            <img src="/m<%= item.imageUrl[0] %>" 
                                            class="img-responsive" alt="轮播1">
                                        </a>
                                    </div>
                                <% } %>
                            <% })%>
                        <% } %>
                    </div>
                    <!-- 分页器 -->
                    <div class="swiper-pagination swiperpagination"></div>
                </div>
            </div>
            <!-- 热门游戏 -->
            <div class="aggamenav">
                <!-- 楼层名称 -->
                <div class="gamefloorname">
                    <div class="gamefloorpng">
                        <% if(lang=='zh_TW'){ %>
                            <img src="/mimage/mhotgamezh_TW.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='zh_CN'){ %>
                            <img src="/mimage/mhotgamezh_CN.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='en_US'){ %>
                            <img src="/mimage/mhotgameen_US.png" class="img-responsive" />
                        <% } %>
                    </div>
                </div>
                <!-- 楼层内容 -->
                <div class="hotgamelist">
                    <% if(gamelist.length){ %>
                        <% gamelist.forEach((item,index) => { %>
                            <% if(allMine.length){ %>
                                <div class="hotlist-item">
                                    <a @click="gotohyperdice">
                                        <img src="/mimage/hotgame01.jpg" alt="" class="img-responsive">
                                        <div class="list-name">
                                            <span class="game-name"><%= __('hyperplay') %></span> 
                                            <div class="gotogame">
                                                <i class="icon iconfont icon-iconfontjiantou4"></i>
                                            </div>
                                        </div>
                                    </a>
                                </div>
                            <% } %>    
                            <% if(!allMine.length){ %>
                                <div class="hotlist-item">
                                    <a href="/m/singin">
                                        <img src="/mimage/hotgame01.jpg" alt="" class="img-responsive">
                                        <div class="list-name">
                                            <span class="game-name"><%= __('hyperplay') %></span> 
                                            <div class="gotogame">
                                                <i class="icon iconfont icon-iconfontjiantou4"></i>
                                            </div>
                                        </div>
                                    </a>
                                </div>
                            <% } %>    
                        <% }) %>
                    <% } %> 
                    <!-- TCG彩票 -->
                    <div class="hotlist-item">
                        <% if(!allMine.length){ %>
                            <a href="/m/singin">
                                <img src="/mimage/hotgame02.jpg" alt="" class="img-responsive">
                                <div class="list-name">
                                    <span class="game-name"><%= __('BlockLottery') %></span> 
                                    <div class="gotogame">
                                        <i class="icon iconfont icon-iconfontjiantou4"></i>
                                    </div>
                                </div>
                            </a> 
                        <% } %>    
                        <% if(allMine.length){ %>
                            <a href="/m/tcggame">
                                <img src="/mimage/hotgame02.jpg" alt="" class="img-responsive">
                                <div class="list-name">
                                    <span class="game-name"><%= __('BlockLottery') %></span> 
                                    <div class="gotogame">
                                        <i class="icon iconfont icon-iconfontjiantou4"></i>
                                    </div>
                                </div>
                            </a> 
                        <% } %>     
                    </div>
                </div>
            </div>
            <!-- 沙巴彩票 -->
            <div class="aggamenav">
                <!-- 沙巴彩票楼层图片 -->
                <div class="gamefloorname">
                    <div class="gamefloorpng">
                        <% if(lang=='zh_TW'){ %>
                            <img src="/mimage/sabaiconzh_TW.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='zh_CN'){ %>
                            <img src="/mimage/sabaiconzh_CN.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='en_US'){ %>
                            <img src="/mimage/sabaiconen_US.png" class="img-responsive" />
                        <% } %>
                    </div>
                </div>
                <!-- 沙巴导航条 -->
                <div class="aggametransform">
                    <div class="aggametit">
                    <!-- 币种切换 -->
                    <div class="aggamechoosecoin">
                        <div class="aggamechoosecoin-input">
                            <div class="aggamechoosecoin-select" 
                                @click="sabaexchange.isshowcoinarr=!sabaexchange.isshowcoinarr">
                                <img :src="'/image/'+sabaexchange.defaultcoin+'.png'" 
                                :alt="sabaexchange.defaultcoin">
                                <span v-html="sabaexchange.defaultcoin"></span>
                                <i class="icon iconfont icon-sanjiaodown"></i>
                            </div>
                            <!-- 下拉菜单 -->
                            <% if(allMine.length){ %>
                            <div class="coindropdownmenu" v-show="sabaexchange.isshowcoinarr">
                                <% allMine.forEach( (item,index) => { %>
                                <div class="coindropdownmenu-item coinitem" 
                                    :class="{selected:'<%- item.coin %>'==sabaexchange.defaultcoin}" 
                                    @click="changesabaexchangecoin('<%= item.coin %>','<%= item.balance %>')">
                                    <img src="mimage/<%= item.coin %>.png" alt="">
                                    <span><%= item.coin %></span>
                                </div>
                                <% }) %>
                            </div>
                            <% } %>
                            </div>
                        </div>
                        <!-- 各币种AG分 -->
                        <div class="myintegral">
                            <div class="integral"><%= __('Myshabahpoints') %>&nbsp;</div>
                            <div class="integral-num" v-html="sabauserinfo.myagbanlance"></div>
                        </div>
                    </div>
                    <!-- 兑换积分 -->
                    <% if(allMine.length){ %>
                        <div class="transformintegral" @click="issabashowexchange=!issabashowexchange">
                            <i class="icon iconfont icon-iconfontarrows"></i>
                        </div>
                    <% } %>
                    <% if(!allMine.length){ %>
                        <div class="transformintegral">
                            <a href="/m/singin">
                                <i class="icon iconfont icon-iconfontarrows"></i>
                            </a>
                        </div>
                    <% } %>
                </div>
                <!-- 兑换栏目 -->
                <% if(allMine.length){ %>
                    <div class="chage-transformbtnbox" v-show="issabashowexchange">
                        <% if(allMine.length){ %>
                            <div class="transformbtn transformin" :class="{active:sabashowtransforminag==true}"
                            @click="changetransform('sabashowtransforminag')"><%= __('Exchangeshabapoints') %></div>
                            <div class="transformbtn" :class="{active:sabashowtransformout==true}" 
                            @click="changetransform('sabashowtransformout')"><%= __('Withdrawshabapoints') %></div>
                        <% } %>
                        <% if(!allMine.length){ %>
                            <div class="transformbtn transformin">
                                <a href="/singin"><%= __('Exchangeshabapoints') %></a>
                            </div>
                            <div class="transformbtn">
                                <a href="/singin"><%= __('Withdrawshabapoints') %></a>
                            </div>
                        <% } %> 
                    </div>
                <% } %>
                <!-- 兑换沙巴分 -->
                <% if(allMine.length){ %>
                    <div class="transforminbox transformbox" v-show="issabashowexchange&&sabashowtransforminag">
                        <div class="transform-form">
                            <div class="form-item <%= lang %>">
                                <label class="item-label"><%= __('Currencyexchange') %></label>
                                <div class="item-label">
                                    <span v-html="sabaexchange.defaultcoin"></span>
                                </div>
                            </div>
                            <!-- 兑换比例 -->
                            <div class="form-item form-bigmg <%= lang %>">
                                <label class="item-label"><%= __('Exchangequantity') %></label>
                                <div class="item-input">
                                    <input type="number" class="form-input" v-model="sabaexchangenum">
                                </div>
                            </div>
                            <div class="form-item <%= lang %>">
                                <label class="item-label"><%= __('Youwillget') %></label>
                                <div class="item-tip">
                                    <span v-html="sabaexchange.exchangeagcoin"></span>
                                </div>
                                <label class="item-label"><%= __('sabaPoints') %></label>
                            </div>
                        </div>
                        <div class="postformbox">
                            <button class="postform" @click="confirmsabaexchange" :disabled="sabaexchange.disabledbtn"><%= __('Confirmexchange') %></button>
                        </div>
                    </div>
                <% } %>
                <!-- 兑出沙巴分 -->
                <% if(allMine.length){ %>
                    <div class="transformoutbox transformbox" v-show="issabashowexchange&&sabashowtransformout">
                        <div class="transform-form">
                            <!-- 兑换比例 -->
                            <div class="form-item <%= lang %>">
                                <label class="item-label"><%= __('CashOutsabapoints') %></label>
                                <div class="item-input">
                                    <input type="text" class="form-input" v-model="sabacashoutnum">
                                </div>
                            </div> 
                            <!-- 换算币种值 -->
                            <div class="form-item form-bigmg <%= lang %>">
                                <label class="item-label"><%= __('Youwillget') %></label>
                                <div class="item-tip">
                                    <span v-html="sabacashout.exchangeagcoin"></span>
                                </div>
                                <label class="item-label" v-html="sabaexchange.defaultcoin"></label>
                            </div> 
                        </div>
                        <div class="postformbox">
                            <button class="postform" @click="confirmsabacashout" 
                            :disabled="sabacashout.disabledbtn"><%= __('Confirmation') %></button>
                        </div>
                    </div>
                <% } %>
            </div>
            <!-- 沙巴体彩图片 -->
            <div class="sababgimg">
                <!-- sabasports.jpg -->
                <% if(allMine.length){ %>
                    <img src="/mimage/sabasports.jpg" alt="体育竞猜" class="img-responsive" @click="gotomPicksPal"/>
                <% }else{ %>
                    <a href="/m/singin"><img src="/mimage/sabasports.jpg" class="img-responsive" alt="体育竞猜"></a>
                <% } %>
            </div>
            <!-- AG亚游导航 -->
            <div class="aggamenav">
                <!-- 楼层名称 -->
                <div class="gamefloorname">
                    <div class="gamefloorpng">
                        <% if(lang=='zh_TW'){ %>
                            <img src="/mimage/magzh_TW.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='zh_CN'){ %>
                            <img src="/mimage/magzh_CN.png" class="img-responsive" />
                        <% } %>
                        <% if(lang=='en_US'){ %>
                            <img src="/mimage/magen_US.png" class="img-responsive" />
                        <% } %>
                    </div>
                </div>
                <!-- AG导航条 -->
                <div class="aggametransform">
                    <!-- AG导航 -->
                    <div class="aggametit">
                        <!-- 币种切换 -->
                        <div class="aggamechoosecoin">
                            <div class="aggamechoosecoin-input">
                                <div class="aggamechoosecoin-select" 
                                    @click="exchange.isshowcoinarr=!exchange.isshowcoinarr">
                                    <img :src="'/image/'+exchange.defaultcoin+'.png'" :alt="exchange.defaultcoin">
                                    <span v-html="exchange.defaultcoin"></span>
                                    <i class="icon iconfont icon-sanjiaodown"></i>
                                </div>
                                <!-- 下拉菜单 -->
                                <% if(allMine.length){ %>
                                    <div class="coindropdownmenu" v-show="exchange.isshowcoinarr">
                                        <% allMine.forEach( (item,index) => { %>
                                            <div class="coindropdownmenu-item coinitem" 
                                                :class="{selected:'<%- item.coin %>'==exchange.defaultcoin}" 
                                                @click="changeexchangecoin('<%= item.coin %>','<%= item.balance %>')">
                                                <img src="mimage/<%= item.coin %>.png" alt="">
                                                <span><%= item.coin %></span>
                                            </div>
                                        <% }) %>
                                    </div>
                                <% } %>
                            </div>
                        </div>
                        <!-- 各币种AG分 -->
                        <div class="myintegral">
                            <div class="integral"><%= __('MyAGpoints') %>&nbsp;</div>
                            <div class="integral-num" v-html="userinfo.myagbanlance"></div>
                        </div>
                    </div>
                    <!-- 兑换积分 -->
                    <% if(allMine.length){ %>
                        <div class="transformintegral" @click="isshowexchange=!isshowexchange">
                            <i class="icon iconfont icon-iconfontarrows"></i>
                        </div>
                    <% } %>
                    <% if(!allMine.length){ %>
                        <div class="transformintegral">
                            <a href="/m/singin">
                                <i class="icon iconfont icon-iconfontarrows"></i>
                            </a>
                        </div>
                    <% } %>
                </div>
                <!-- 兑换栏目 -->
                <% if(allMine.length){ %>
                <div class="chage-transformbtnbox" v-show="isshowexchange">
                    <% if(allMine.length){ %>
                        <div class="transformbtn transformin" :class="{active:showtransforminag==true}"
                        @click="changetransform('showtransforminag')"><%= __('ExchangeAGpoints') %></div>
                        <div class="transformbtn" :class="{active:showtransformout==true}" 
                        @click="changetransform('showtransformout')"><%= __('WithdrawAGpoints') %></div>
                    <% } %>
                    <% if(!allMine.length){ %>
                        <div class="transformbtn transformin">
                            <a href="/singin"><%= __('ExchangeAGpoints') %></a>
                        </div>
                        <div class="transformbtn">
                            <a href="/singin"><%= __('WithdrawAGpoints') %></a>
                        </div>
                    <% } %> 
                </div>
                <% } %>
                <!-- 兑换AG分 -->
                <% if(allMine.length){ %>
                <div class="transforminbox transformbox" v-show="isshowexchange&&showtransforminag">
                    <div class="transform-form">
                        <div class="form-item <%= lang %>">
                            <label class="item-label"><%= __('Currencyexchange') %></label>
                            <div class="item-label">
                                <span v-html="exchange.defaultcoin"></span>
                            </div>
                        </div>
                        <!-- 兑换比例 -->
                        <div class="form-item form-bigmg <%= lang %>">
                            <label class="item-label"><%= __('Exchangequantity') %></label>
                            <div class="item-input">
                                <input type="number" class="form-input" v-model="exchangenum">
                            </div>
                        </div>
                        <div class="form-item <%= lang %>">
                            <label class="item-label"><%= __('Youwillget') %></label>
                            <div class="item-tip">
                                <span v-html="exchange.exchangeagcoin"></span>
                            </div>
                            <label class="item-label"><%= __('AGPoints') %></label>
                        </div>
                    </div>
                    <div class="postformbox">
                        <button class="postform" @click="confirmexchange" :disabled="exchange.disabledbtn"><%= __('Confirmexchange') %></button>
                    </div>
                </div>
                <% } %>
                <!-- 兑出AG分 -->
                <% if(allMine.length){ %>
                <div class="transformoutbox transformbox" v-show="isshowexchange&&showtransformout">
                    <div class="transform-form">
                        <!-- 兑换比例 -->
                        <div class="form-item <%= lang %>">
                            <label class="item-label"><%= __('CashOutpoints') %></label>
                            <div class="item-input">
                                <input type="text" class="form-input" v-model="cashoutnum">
                            </div>
                        </div> 
                        <!-- 换算币种值 -->
                        <div class="form-item form-bigmg <%= lang %>">
                            <label class="item-label"><%= __('Youwillget') %></label>
                            <div class="item-tip">
                                <span v-html="cashout.exchangeagcoin"></span>
                            </div>
                            <label class="item-label" v-html="exchange.defaultcoin"></label>
                        </div> 
                    </div>
                    <div class="postformbox">
                        <button class="postform" @click="confircashout" :disabled="cashout.disabledbtn"><%= __('Confirmation') %></button>
                    </div>
                </div>
                <% } %>
            </div>
            <!-- AG亚游列表 -->
            <div class="aggamelist">
                <% if(gamerecommend.length){ %>
                    <% gamerecommend.forEach((item,index) => { %>
                        <% if(allMine.length){ %>
                            <div class="list-item">
                                <img src="<%= item.imageUrl[0] %>zh_CN.jpg" 
                                alt="AG亚游" class="img-responsive" 
                                @click="enteraggame('<%- item.code %>')">
                                <div class="list-name">
                                    <span class="game-name" 
                                    @click="enteraggame('<%- item.code %>')"><%= JSON.parse(item.name)[lang] %></span>
                                    <div class="gotogame" @click="enteraggame('<%- item.code %>')">
                                        <i class="icon iconfont icon-iconfontjiantou4"></i>
                                    </div>
                                </div>
                            </div>
                        <% } %>
                        <% if(!allMine.length){ %>
                            <div class="list-item">
                                <a href="/m/singin">
                                    <img src="<%= item.imageUrl[0] %>zh_CN.jpg" 
                                    alt="AG亚游" class="img-responsive">
                                    <div class="list-name">
                                        <span class="game-name"><%= JSON.parse(item.name)[lang] %></span>
                                        <div class="gotogame">
                                            <i class="icon iconfont icon-iconfontjiantou4"></i>
                                        </div>
                                    </div>
                                </a>
                            </div>
                        <% } %>
                    <% }) %>
                <% } %>
            </div>
            <!-- 更多AG游戏 -->
            <div class="moreaggame">
                <% if(allMine.length){ %>
                    <a href="/m/moregame"><%= __('MoreAGgames') %></a>
                <% } %>
                <% if(!allMine.length){ %>
                    <a href="/m/singin"><%= __('MoreAGgames') %></a>
                <% } %>
            </div>
        </section>
    </div>
    <%- include('base/mfooter'); %>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.2/js/swiper.min.js"></script>
    <script src="/mjs/mhome.js"></script>
</body>
</html>